package com.cloudfun.campusshare.device.protocol.response;

import lombok.Data;

import java.util.HashMap;
import java.util.Map;

/**
 * Created by Huqin on 2020/3/12
 */
@Data
public class GgyState extends State {

    private static final Map<Integer, Integer> washTypeMap = new HashMap<>();

    static {
        washTypeMap.put(1, 0);//0待机
        washTypeMap.put(2, 4);//4暂停
        washTypeMap.put(3, 2);//2、3烘干、冷却
        washTypeMap.put(4, 5);//5结束
        washTypeMap.put(5, 1);//1启动等待
    }

    /**
     * 0：待机;
     * 1：启动等待.
     * 2、3：烘干、冷却;
     * 4：暂停;
     * 5：结束;
     */
    private Integer cyclePhaseCD;

    /**
     * 0--冷风;1--低温;2--高温.3—中温.
     */
    private Integer tempLevel;

    /**
     * 剩余加热时间
     */
    private Integer remainingTimeMM;

    public void setCyclePhaseCD(Integer cyclePhaseCD) {
        this.cyclePhaseCD = washTypeMap.get(cyclePhaseCD);
    }
}
